import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class found_rank_4 extends StatefulWidget {
  found_rank_4(
      {Key key,
      this.rank,
      this.cartoon_id,
      this.cartoon_img,
      this.cartoon_name})
      : super(key: key);
  String cartoon_name;
  String cartoon_img;
  int cartoon_id;
  int rank;
  @override
  State<found_rank_4> createState() => _found_rank_4State();
}

class _found_rank_4State extends State<found_rank_4> {
  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        print(widget.cartoon_id);
      },
      child: Column(children: [
        Container(
          margin: EdgeInsets.only(top: 10, right: 10),
          height: 72,
          width: 72,
          decoration: new BoxDecoration(
            color: Colors.black12,

            // 设置四周圆角，角度
            borderRadius: BorderRadius.all(Radius.circular(4.0)),
          ),
          child: Stack(children: [
            Container(
              // height: 318,
              width: 155,
              height: 72,

              child: Image(
                fit: BoxFit.fill,
                image: NetworkImage(widget.cartoon_img),
              ),
              // child: cartoon_rank[0]['imageUrl'],
            ),
            Image.asset('assets/images/common/cartoon/rank_biaoqian.png'),
            Container(
              margin: EdgeInsets.all(4),
              child: Text(
                'No.' + widget.rank.toString(),
                style: TextStyle(fontSize: 8),
              ),
            )
          ]),
        ),
        Row(children: [
          Container(
            margin: EdgeInsets.only(top: 4, bottom: 4, right: 10),
            width: 72,
            child: Text(
              widget.cartoon_name,
              style: TextStyle(fontSize: 14),
            ),
          ),
        ]),
      ]),
    );
  }
}
